﻿using ERP.MasterData.Dtos;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ERP.MasterData
{
    public interface IMaterialService : IApplicationService
    {
        /// <summary>
        /// 获取物料列表
        /// </summary>
        Task<PagedResultDto<MaterialDto>> GetListAsync(GetMaterialInputDto input);
        
        /// <summary>
        /// 获取物料详情
        /// </summary>
        Task<MaterialDto> GetAsync(int id);
        
        /// <summary>
        /// 创建物料
        /// </summary>
        Task<MaterialDto> CreateAsync(CreateMaterialDto input);
        
        /// <summary>
        /// 更新物料
        /// </summary>
        Task<MaterialDto> UpdateAsync(int id, UpdateMaterialDto input);
        
        /// <summary>
        /// 删除物料
        /// </summary>
        Task DeleteAsync(int id);
        
        /// <summary>
        /// 批量删除物料
        /// </summary>
        Task BatchDeleteAsync(List<int> ids);
        
        /// <summary>
        /// 生成物料编码
        /// </summary>
        Task<string> GenerateMaterialCodeAsync();
        
        /// <summary>
        /// 导出物料
        /// </summary>
        Task<byte[]> ExportAsync(GetMaterialInputDto input);
        
        /// <summary>
        /// 获取物料类型树
        /// </summary>
        Task<List<MaterialTypeTreeDto>> GetMaterialTypeTreeAsync();
    }
}
